package com.briup.sxau.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity(name = "t_comment")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Comment {
    @Id
//    GeneratedValue 主键生成策略  mysql 支持主键自增所以数据库层面没有问题 h2 不支持主键自增 所以要使用序列来完成
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    private int id;
    private String content;
    private Integer superId;
}
